﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UniMana.Data.Quiz;
using System.Data.Linq;

namespace UniMana.Lib.Quiz
{
    public static class Quiz_SubjectTopicData
    {
        public static IQueryable GetListBySubject(this Table<Quiz_SubjectTopic> _nTopic, int _iSubjectKey)
        {
            var result = from ntopc in _nTopic
                         where ntopc.Training_SubjectKey == _iSubjectKey
                         select new
                         {
                             ntopc.Quiz_SubjectTopicKey,
                             ntopc.Name,
                             Check=false,
                             NumQues =0
                         };
            return result;
            //return _nTopic.Where(p => p.Training_SubjectKey == _iSubjectKey);
        }
    }
}
